package com.collabscm.pf.logging.slf4j;

import com.collabscm.pf.logging.Logger;

/**
 * LogBack的Logger实现类
 * 
 * @author Zeng Raoxing
 */
public class Slf4jLogger implements Logger {
	/**
	 * 原始的Logger提供者
	 */
	private org.slf4j.Logger logger;
	
	/**
	 * 设置Logger
	 * @param logger
	 */
	protected Slf4jLogger(org.slf4j.Logger logger) {
		this.logger = logger;
	}

	@Override
	public void trace(String msg) {
		logger.trace(msg);
	}

	@Override
	public void trace(String format, Object... args) {
		logger.trace(format, args);
	}

	@Override
	public void debug(String msg) {
		logger.debug(msg);
	}

	@Override
	public void debug(String format, Object... args) {
		logger.debug(format, args);
	}

	@Override
	public void info(String msg) {
		logger.info(msg);
	}

	@Override
	public void info(String format, Object... args) {
		logger.info(format, args);
	}

	@Override
	public void warn(String msg) {
		logger.warn(msg);
	}

	@Override
	public void warn(String format, Object... args) {
		logger.warn(format, args);
	}

	@Override
	public void warn(String msg, Throwable t) {
		logger.warn(msg, t);
	}

	@Override
	public void error(String msg) {
		logger.error(msg);
	}

	@Override
	public void error(String format, Object... args) {
		logger.error(format, args);
	}

	@Override
	public void error(String msg, Throwable t) {
		logger.error(msg, t);
	}

	@Override
	public boolean isDebugEnabled() {
		return logger.isDebugEnabled();
	}

	@Override
	public boolean isInfoEnabled() {
		return logger.isInfoEnabled();
	}

	@Override
	public boolean isTraceEnabled() {
		return logger.isTraceEnabled();
	}

}
